package routers

import (
	"gin-project-01/gin-step03/gin13-session/controllers/index"
	"gin-project-01/gin-step03/gin13-session/middlewares"
	"github.com/gin-gonic/gin"
)

func IndexRouters(r *gin.Engine) {
	//路由分组中间件使用方式一
	routers := r.Group("/", middlewares.SaveAccessLog)

	{

		//跳转到index.html
		routers.GET("/index", index.IndexController{}.Index)

		//跳转到user.html
		routers.GET("/user", index.IndexController{}.User)

		//跳转到file.html,
		routers.GET("/file", index.IndexController{}.File)

	}
}
